<p class="text-right doc-link">Table <a target="_blank" ng-href="{{ wikiLink }}quest_template"><span class="glyphicon glyphicon-link" aria-hidden="true"></span>quest_template</a></p>

<div class="row" ng-show="version.name == '6.x'">

  <div class="col-xs-12">

    <div class="row">

      <div class="col-xs-2 borders">
        <h4>Portrait</h4>
        <small>PortraitGiver</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.PortraitGiver">

        <small>PortraitTurnIn</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.PortraitTurnIn">

        <small>PortraitGiverText</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.PortraitGiverText">

        <small>PortraitGiverName</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.PortraitGiverName">

        <small>PortraitTurnInText</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.PortraitTurnInText">

        <small>PortraitTurnInName</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.PortraitTurnInName">
      </div>

      <div class="col-xs-8 borders">
        <div class="row">
          <h4>Rewards</h4>
          <div class="col-xs-3">
            <small>RewardChoiceItemDisplayID1</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemDisplayID1">

            <small>RewardChoiceItemDisplayID2</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemDisplayID2">

            <small>RewardChoiceItemDisplayID3</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemDisplayID3">

            <small>RewardChoiceItemDisplayID4</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemDisplayID4">

            <small>RewardChoiceItemDisplayID5</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemDisplayID5">

            <small>RewardChoiceItemDisplayID6</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardChoiceItemDisplayID6">
          </div>

          <div class="col-xs-3">
            <small>RewardCurrencyID1</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyID1">

            <small>RewardCurrencyID2</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyID2">

            <small>RewardCurrencyID3</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyID3">

            <small>RewardCurrencyID4</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyID4">
          </div>

          <div class="col-xs-3">
            <small>RewardCurrencyQty1</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyQty1">

            <small>RewardCurrencyQty2</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyQty2">

            <small>RewardCurrencyQty3</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyQty3">

            <small>RewardCurrencyQty4</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardCurrencyQty4">

            <small>RewardFactionFlags</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardFactionFlags">
          </div>

          <div class="col-xs-3">
            <small>RewardXPMultiplier</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardXPMultiplier">

            <small>RewardMoneyDifficulty</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardMoneyDifficulty">

            <small>RewardMoneyMultiplier</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardMoneyMultiplier">

            <small>RewardSkillLineID</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardSkillLineID">

            <small>RewardNumSkillUps</small>
            <input class="form-control input-xs" type="text" ng-model="new_quest_template.RewardNumSkillUps">
          </div>

        </div>
      </div>

      <div class="col-xs-2 borders">
        <h4>Other</h4>
        <small>QuestPackageID</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.QuestPackageID">

        <small>FlagsEx</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.FlagsEx">

        <small>AcceptedSoundKitID</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.AcceptedSoundKitID">

        <small>CompleteSoundKitID</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.CompleteSoundKitID">

        <small>AreaGroupID</small>
        <input class="form-control input-xs" type="text" ng-model="new_quest_template.AreaGroupID">
      </div>

    </div>

  </div>
</div>

<div class="row borders" ng-show="version.name == '3.3.5'">

  <h4>Requirements to finish quest</h4>

  <div class="col-xs-2">
    <small>RequiredItemId1</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemId1">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RequiredItemId1', 'item')">...</button>
      </div>
    </div>
    <small>RequiredItemId2</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemId2">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RequiredItemId2', 'item')">...</button>
      </div>
    </div>
    <small>RequiredItemId3</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemId3">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RequiredItemId3', 'item')">...</button>
      </div>
    </div>
    <small>RequiredItemId4</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemId4">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RequiredItemId4', 'item')">...</button>
      </div>
    </div>
    <small>RequiredItemId5</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemId5">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RequiredItemId5', 'item')">...</button>
      </div>
    </div>
    <small>RequiredItemId6</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemId6">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openSearchModal(new_quest_template, 'RequiredItemId6', 'item')">...</button>
      </div>
    </div>
  </div>
  <div class="col-xs-2">
    <small>RequiredItemCount1</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemCount1">
    </div>
    <small>RequiredItemCount2</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemCount2">
    </div>
    <small>RequiredItemCount3</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemCount3">
    </div>
    <small>RequiredItemCount4</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemCount4">
    </div>
    <small>RequiredItemCount5</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemCount5">
    </div>
    <small>RequiredItemCount6</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredItemCount6">
    </div>
  </div>

  <div class="col-xs-2">
    <small>RequiredFactionId1</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredFactionId1">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RequiredFactionId1', 'faction')">...</button>
      </div>
    </div>
    <small>RequiredFactionId2</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredFactionId2">
      <div class="input-group-btn">
        <button class="btn btn-info input-xs" ng-click="openValueModal(new_quest_template, 'RequiredFactionId2', 'faction')">...</button>
      </div>
    </div>

    <small>ReqFactionValue1</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredFactionValue1">
    </div>

    <small>ReqFactionValue2</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredFactionValue2">
    </div>

    <small>RequiredPlayerKills</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredPlayerKills">
    </div>

  </div>
  <div class="col-xs-2">
    <small>RequiredNpcOrGo1</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGo1">
    </div>
    <small>RequiredNpcOrGo2</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGo2">
    </div>
    <small>RequiredNpcOrGo3</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGo3">
    </div>
    <small>RequiredNpcOrGo4</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGo4">
    </div>
  </div>
  <div class="col-xs-2">
    <small>ReqNpcOrGoCount1</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGoCount1">
    </div>
    <small>ReqNpcOrGoCount2</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGoCount2">
    </div>
    <small>ReqNpcOrGoCount3</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGoCount3">
    </div>
    <small>ReqNpcOrGoCount4</small>
    <div class="input-group">
      <input class="form-control input-xs" type="text" ng-model="new_quest_template.RequiredNpcOrGoCount4">
    </div>
  </div>

</div>
<br>
<div class="row">
  <div class="col-xs-2 pull-right">
    <button class="btn btn-success" ng-click="openScriptTab()">UPDATE SQL Script</button>
  </div>
  <div class="col-xs-2 pull-right">
    <button class="btn btn-primary" ng-click="openFullScriptModal([new_quest_template, new_quest_template_addon, new_quest_details, new_quest_request_items, new_quest_offer_reward], ['quest_template', 'quest_template_addon', 'quest_details', 'quest_request_items', 'quest_offer_reward'], ['ID', 'ID', 'ID', 'ID', 'ID'])">FULL Quest SQL</button>
  </div>
</div>
<br>
